var path=require('path');

console.log(path.dirname('/a/b/c/index.html'));

console.log(path.basename('/a/b/c/index.html'));//=>index.html
console.log(path.basename('/a/b/c/index.html','.html'));//=>index
console.log(path.basename('/a/b/c/index.html','.css'));//=>index.html


console.log(path.extname('/a/b/c/index.html'));//=>.html
console.log(path.extname('/a/b/c/index'));//=>''
console.log(path.extname('/a/b/c/index.'));//=>.
console.log(path.extname('/a/b/c/index.x'));//=>.x



